<script type="text/javascript">
//Menu sidebar

//jQuery UI - Live Search
$(function() {
		$('#sidebar-nav > li > a').click(function(){
		    if ($(this).attr('class') != 'active'){
		      $('#sidebar-nav li ul').slideUp();
		      $(this).next().slideToggle();
		      $('#sidebar-nav li a').removeClass('active');
		      $(this).addClass('active');
			  return false;
		    } 
		});
	
		var availableTags = ["dashboard", "site", "manage site", "edit site", "delete site",
			             	 "admin", "manage admin", "edit admin", "delete admin", "statistics", 
			             	 "products", "edit product", "delete product", "manage products"
			             	];
		$("#livesearch").autocomplete({
			source: availableTags,
			select: function(event, ui) {
				var data = 'keyword='+ui.item.value;
				//alert(data);
		 	    var url = "/admin/autocomplete/search";
		 		$.ajax({
		 			url: url,
		 			type: 'POST',
		 			data: data,
		 			success: function(result){
		 				//window.location=result;
		 				//alert(result);
		 				window.location.assign(result);
		 			},
		 			error: function (){
		 				alert('Có lỗi xảy ra');
		 			}
		 		});
			}
		});
});	
</script>

<aside>
      <!-- Start Live Search  -->
      <div class="block">
      <form class="searchform" action="#">
        <input id="livesearch" type="text" onBlur="if (this.value == '') {this.value = 'Live Search...';}" onFocus="if (this.value == 'Live Search...') {this.value = '';}" value="Live Search..." class="searchfield" />
      </form>
      </div>
<ul id="sidebar-nav">
<li><a href="#">Quản lý sinh viên</a>
<ul class="drop" style="<?php if((strcmp($this->controller,'index')==0) || strcmp($this->controller,'student')==0) echo 'display: block;' ?>">
  

<li><a href="<?php echo DOMAIN_INDEX ?>/admin/student/import-excel-student"><img src="/doan/source/public/images/icons/16/page_add.png">Import thông tin sinh viên</a></li>
<li><a href="<?php echo DOMAIN_INDEX ?>/admin/student"><img src="/doan/source/public/images/icons/16/page_add.png">Danh sách sinh viên</a></li>


</ul>
</li>

<li><a href="#">Quản lý giáo viên</a>
	<ul class="drop" style="<?php if((strcmp($this->controller,'teacher')==0)) echo 'display: block;' ?>">
	  <li><a href="<?php echo DOMAIN_INDEX ?>/admin/teacher/import-excel-teacher"><img src="/doan/source/public/images/icons/16/comments.png">Import giao vien</a></li>
	  <li><a href="<?php echo DOMAIN_INDEX ?>/admin/teacher"><img src="/doan/source/public/images/icons/16/page_add.png">Danh sách giáo viên</a></li>
	</ul>
</li>


<li><a href="#">Quản lý mở rộng</a>
<ul class="drop" style="<?php if(strcmp($this->controller,'subjects')==0 || strcmp($this->controller,'institutes')==0  || strcmp($this->controller,'semester')==0 || strcmp($this->controller,'admin')==0 || strcmp($this->controller,'room')==0 || strcmp($this->controller,'infoclass')==0) echo 'display: block;' ?>">
	<li><a href="<?php echo DOMAIN_INDEX ?>/admin/admin/account"><img src="/doan/source/public/images/icons/16/page_add.png">Quản lý tài khoản</a></li>
  <li><a href="<?php echo DOMAIN_INDEX ?>/admin/infoclass/import-excel"><img src="/doan/source/public/images/icons/16/comments.png">Gan sv-lop</a></li>
    <li><a href="<?php echo DOMAIN_INDEX ?>/admin/infoclass/list-student-class"><img src="/doan/source/public/images/icons/16/comments.png">Danh sách lớp sinh viên</a></li>
  <li><a href="<?php echo DOMAIN_INDEX ?>/admin/subjects"><img src="/doan/source/public/images/icons/16/page_add.png">Danh sách môn học</a></li>
<li><a href="<?php echo DOMAIN_INDEX ?>/admin/institutes"><img src="/doan/source/public/images/icons/16/page_add.png">Quản lý khoa/viện</a></li>
<li><a href="<?php echo DOMAIN_INDEX ?>/admin/room"><img src="/doan/source/public/images/icons/16/page_add.png">Quản lý phòng học</a></li>
<li><a href="<?php echo DOMAIN_INDEX ?>/admin/semester"><img src="/doan/source/public/images/icons/16/page_add.png">Quản lý học kì</a></li>

</ul>
</li>

</ul>
<br /> <br /> 

</aside>